package org.grow.consumer.controller;


import org.grow.consumer.service.ProviderFeignService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: xwg
 * @CreateDate: 21-8-16
 */

@RestController
public class ConsumerController {

    @Resource
    private ProviderFeignService providerFeignService;
    @PutMapping("/cc/{id}")
    public String showPersonalInfo(@PathVariable("id") String id){
//        todo:远程调用
        String fullName = providerFeignService.getFullName(id);
        return "======>>>"+fullName+"<<<=====";
    }
    @GetMapping("/cc/unixTime")
    public String showUnitTime(){
        return "ConsumerUnixTime: "+System.currentTimeMillis();
    }
}
